1. Field of the Invention
The present invention relates to an image processor, an image processing method, and a computer program product.
2. Description of the Related Art
Conventionally, for automatically recognizing a document area in an image, a lining portion (lining area) of an image reader such as a scanner can be switched to white or black. When reading the image, the lining portion is changed to black such that there is a difference between concentrations of a document area and the lining portion. Thereby, when the difference between concentrations of the document area and the lining portion is large (specifically, when the difference between concentrations of edges of the document area and the lining portion is large), as shown in an upper part of FIG. 11, which is a view showing one example of the conventional art, a rectangular document area may be correctly recognized by four straight lines, that is to say, the edges of the document area may be correctly recognized, and consequently it is possible to perform tilt correction (deskew, skew correction)) of the document area and clipping (cropping) of the document correctly (for example, refer to JP-A-2007-88654). However, when the document is read in a bending state, the document area without a bent portion is recognized, as shown in FIG. 12, which is a view showing one example of the conventional art.
However, when the difference between concentrations of the document area and the lining portion is small, the document area might be recognized by four straight lines as shown in a lower part of FIG. 11, so that it becomes difficult to correctly recognize the edges of the document area, and consequently it also becomes difficult to perform the deskewing and the cropping correctly.
Therefore, JP-A-2004-363889 discloses a technique of utilizing both images of front and back sides when identifying the background area. JP-A-2007-189577 discloses the technique of performing a tilt correction of the document area based on a detection result of the edge to determine the document area based on a histogram of luminance of longitudinal and horizontal pixels of the document area after being corrected. Japanese Patent No. 3910224 discloses the technique of detecting a skew amount by detecting two corners of a forward edge of the document area. JP-A-58-33778 discloses the technique of performing a skew correction by detecting the outermost position of the document area.
However, according to the conventional art, when the difference between concentrations of the document area and the lining portion is small for both images of front and back sides, it is still difficult to recognize the edge of the document area correctly, and consequently there is a problem that it is also still difficult to correctly perform the deskewing and the cropping. When utilizing the both images of front and back sides, there is a problem that a process time becomes longer and a memory usage increases.